import request from '@/utils/request'

// 获取任务列表
export const getTaskList = (params) => {
  return request.get('/dataTask/list', params)
}
// 获取任务详情(id)
export const getTaskById = (id) => {
  return request.get(`/dataTask/select/${id}`, id)
}
// 添加数据任务
export const addTask = (data) => {
  return request.post('/dataTask/add', data)
}
// 修改数据任务
export const updateTask = (data) => {
  return request.put('/dataTask/update', data)
}
// 删除数据任务
export const deleteTask = (id) => {
  return request.delete(`/dataTask/delete/${id}`, id)
}
// 数据采集和转换任务
export const executeTask = (taskId) => {
  return request.post(`/dataTask/execute/${taskId}`, taskId)
}
